<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.spoto.oa.model.Sales" isELIgnored="false"%>
<%@ page import="com.spoto.oa.dao.impl.*" isELIgnored="false"%>
<%@ page import="com.spoto.oa.util.*"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<%
	    	ProductDaoImpl proDao=new ProductDaoImpl();
	    	List<String> types=proDao.getType();
	     %>
		<base href="<%=basePath%>"/>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title>销售记录欢迎界面</title>
		<link href="style/v1/common/welcome.css" rel="stylesheet"/>
		<script type="text/javascript" src="js/lib/jquery-1.4.2.js"></script>
		<script type="text/javascript" src="js/lib/jquery.validate.js"></script>
		<script src="js/common/welcome.js" type="text/javascript"></script>
		<script type="text/javascript" src="js/lib/cal.js"></script>
		<link href="style/calendar.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="js/sales/welcome_sales.js"></script>
	</head>
	<body>
		<div id="welcome">
			<div class="label">
				<div class="img" style="background: url(style/v1/images/sales.png) no-repeat;">
				</div>
				<h2>
					销售记录管理
				</h2>
			</div>
			<div class="ope">
				<form class="form" action="SalesServlet" method="post" onsubmit="return subcheck()">
					<input type="hidden" name="op_type" value="search" />
					<input type="hidden" name="searchTypeValue" id="searchTypeValue"
						value="${searchType}" />
					<select name="searchType" id="searchType" onchange="typeCheck()">
						<option value="proCode">
							产品编号
						</option>						
						<option value="proType">
							产品类型
						</option>
						<option value="date">
							销售时间
						</option>						
					</select>
					<select id="proType" name="proType" onchange="refreshProCode()">
						<%
							for(int i=0;i<types.size();i++){
						 %>
								<option value="<%=types.get(i) %>">
									<%=types.get(i) %>
								</option>
						<%
							}
						%>
					</select>
					<input type="text" name="dateBegin" class="dateBegin"/>
					<input type="text" name="dateEnd" class="dateEnd"/>
					<input type="text" class="infor" name="infor" value="${infor}" />
					<input type="submit" value="查询" class="search" />
				</form>				
			</div>
			<div>
				<jsp:include page="list_sales.jsp"></jsp:include>
			</div>
		</div>
	</body>
</html>